public class Student {
    private String name;
    private int age;

    private Student() {
        this.name = "默认名";
        this.age = 18;
        System.out.println("Private constructor invoked!");
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("Public constructor invoked!");
    }

    public void sayHello() {
        System.out.println("Hello, my name is " + name + ", I'm " + age + " years old.");
    }

    private void study(String subject) {
        System.out.println(name + " is studying " + subject + "...");
    }

    public String getName() {
        return name;
    }

    private void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }
}